<template>
	<!-- 弹窗 -->
	<e-popup :show="value" round="20rpx" @close="close">
		<view class="no-can-list">
			<view class="e-p-b-24 e-rela e-flex-xy-center">
				<text class="e-font-32 fw-500">{{ $t('classify.查看原因') }}</text>
				<image src="../../static/close.png" class="no-can-list-img img-28" @tap="close">
				</image>
			</view>
			<view class="e-p-20 box e-m-b-20" v-for="item in noCanList" :key="item.commodityUrl">
				<view class="e-flex e-m-b-20">
					<view class="img-box e-m-r-20">
						<image class="img" :src="$fullLink(item.commodityUrl)" mode="aspectFit"></image>
					</view>
					<view class="e-flex-1-1 commodity-box">
						<view class="e-flex-1-1 e-font-26 c-333 e-m-b-20">
							{{item.commodityName}}
						</view>
						<view class="e-font-26 c-secondary text-right">
							x{{item.commodityCount}}
						</view>
					</view>
				</view>
				<view class="e-font-22 c-red">
					<text v-if="receivingType === 3">{{$t('classify.当前商品不支持闪送')}}</text>
					<text v-else-if="receivingType === 5">{{$t('classify.当前商品不支持配送')}}</text>
					<text v-else-if="receivingType === 1">{{$t('classify.当前商品不支持快递')}}</text>
					<text v-else-if="receivingType === 2">{{$t('classify.当前商品不支持自提')}}</text>
				</view>
			</view>
			<view class="btn e-font-28 c-white e-flex-xy-center" :style="{background:AppSkin.primary}" @tap="close">
				<text>{{$t('classify.我知道了')}}</text>
			</view>
		</view>
	</e-popup>
</template>

<script>
	export default {
		props: {
			value: Boolean,
			noCanList: Array,
			receivingType: Number
		},
		data() {
			return {
				show: false
			}
		},
		watch: {

		},
		methods: {
			close() {
				this.$emit('input', false)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.no-can-list {
		padding: 32rpx 20rpx 22rpx 20rpx;
		max-height: 80vh;
		overflow-y: auto;
		.box {
			background: #F7F7F7;
			border-radius: 20px;
		}

		.commodity-box {
			display: flex;
			flex-direction: column;
		}

		.img-box {
			width: 162rpx;
			height: 162rpx;
			background: #FFFFFF;
			border-radius: 20rpx;

			.img {
				width: 162rpx;
				height: 162rpx;
			}
		}

		.no-can-list-img {
			position: absolute;
			top: 10rpx;
			right: 20rpx;
		}
	}
	.btn {
		height: 90rpx;
		border-radius: 46rpx;
		margin-top: 30rpx;
	}
</style>
